package com.cruise.h5.controller;


import com.cruise.common.web.result.Result;
import com.cruise.h5.pojo.dto.PostCommentDTO;
import com.cruise.h5.service.PostCommentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author cruise
 * @since 2021-03-25
 */
@Api(tags = "动态评论接口")
@RestController
@RequestMapping("/h5/post-comment")
public class PostCommentController {

    @Resource
    private PostCommentService postCommentService;

    @ApiOperation("发表评论")
    @PostMapping("/comment")
    public Result comment(@RequestBody PostCommentDTO postCommentDTO){

        postCommentService.comment(postCommentDTO);
        return Result.success();
    }

}

